﻿Public Class SistemKodlari
	Inherits Process

	Public Overrides Sub GenericEvent(ByVal e As ProcessEventArgs)
		Select Case e.EventType
			Case EventType.Initialize
				Start("Sistem kodları", "Sistem kodları listelenmiştir.")
				AddTree()
			Case EventType.Shown
				Rs = Sistem.Kodlar(Local)
				For Each Row In Rs
					If IsDBNull(Rs("kod2")) Then
						Tree.AddNode("", Rs("kod1"), Rs("kod1") & " - " & IsNull(Rs("acik"), ""))
					ElseIf IsDBNull(Rs("kod3")) Then
						Tree.AddNode(Rs("kod1"), Rs("kod1") & "." & Rs("kod2"), Rs("kod1") & "." & Rs("kod2") & " - " & IsNull(Rs("acik"), ""))
					Else
						Tree.AddNode(Rs("kod1") & "." & Rs("kod2"), Rs("kod1") & "." & Rs("kod2") & "." & Rs("kod3"), Rs("kod1") & "." & Rs("kod2") & "." & Rs("kod3") & " - " & IsNull(Rs("acik"), ""))
					End If
				Next
		End Select
	End Sub

End Class
